const MyTransformCode = require("./myTransform");

let ts = new MyTransformCode();

let str1 = "开心每一天";

// console.log(Buffer.from(str1));
// console.log(ts.encode(str1, 1));

let a = ts.encode(str1, 1);

let info = ts.decode(a);

console.log(info);
console.log(ts.getPackageLen(a)); // 一个汉字 3 字节， 共15个字节
